golang/xenlight: re-name Bitmap marshaling functions
authorNick Rosbrook <rosbrookn@ainfosec.com>
Mon, 16 Dec 2019 18:08:01 +0000 (18:08 +0000)
committerGeorge Dunlap <george.dunlap@citrix.com>
Mon, 16 Dec 2019 18:08:01 +0000 (18:08 +0000)
commit7a05fcff7f64b7789042b2379d2de7bf17df1c37
treeac212903cfcbac23fac9665e2840b5514bdb0a62
parent7e84aeb864dc6c0c1e42018d2d99bc3393f88210
golang/xenlight: re-name Bitmap marshaling functions

Re-name and modify signature of toGo function to fromC. The reason for
using 'fromC' rather than 'toGo' is that it is not a good idea to define
methods on the C types. Also, add error return type to Bitmap's toC function.

Finally, as code-cleanup, re-organize the Bitmap type's comments as per
Go conventions.

Signed-off-by: Nick Rosbrook <rosbrookn@ainfosec.com>
Acked-by: George Dunlap <george.dunlap@citrix.com>
--
Changes in v2:
- Use consistent variable naming for slice created from
  libxl_bitmap.
tools/golang/xenlight/xenlight.go